<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/views/common/include/taglib.jsp"%>
<script
	src="${ctx}/js/controllers/base/commonconfig/ConfigListController.js"
	type="text/javascript"></script>
<section>
	<div style="height: 40px; line-height: 40px;">
		<div class="forword_area"></div>
		<div class="location">当前位置：${sessionScope.currcent_position}</div>
	</div>
	<hr>
	<section class="panel panel-default">
		<!--begin table表格 -->
		<div>
			<div>
				<div>
					<input id="label" type="text" maxlength="20" value="${(not empty label)? label : ''  }" class="input-sm form-control" placeholder="描述">&nbsp;
						<div class="btn-group">
							<select class="dropdown-menu" id="pSize">
								<c:forEach items="${pageSizes }" var="item">
									<option value="${item.value }"
										<c:if test="${pSize == item.value }">selected</c:if>>&nbsp;&nbsp;&nbsp;${item.label }</option>
								</c:forEach>
							</select>
						</div>
						<%-- <c:if test="${configureType != 1}">
					<div class="btn-group">
						<select class="dropdown-menu" id="cellId">
							<option value=""
								<c:if test="${cellId == null }">selected="selected"</c:if>>小区名</option>
							<c:forEach items="${cellInfos}" var="item" varStatus="cStatus">
								<option value="${item.id}"
									<c:if test="${item.id == cellId}">selected="selected"</c:if>>${item.cellName}</option>
							</c:forEach>
						</select>
					</div> 
					</c:if> --%>
					&nbsp;
					<div class="form-control">
						<div class="search" onclick="getInfoList();">
							<img src="${ctx }/images/table/search_second.png">
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--end 搜索栏 -->
		<div>
			<table class="table">
				<thead>
					<tr>
						<th width="5%">序号</th>
						<th width="20%">描述</th>
						<th width="15%">名称</th>
						<th width="15%">值</th>
						<th width="5%">单位</th>
						<th width="25%">操作</th>
					</tr>
				</thead>
				<tbody id="tableTbody">
					<c:forEach items="${infoList.list}" var="config"
						varStatus="configStatus">
						<tr onmouseover="mouseoverOne(this)"
							onmouseout="mouseoutOne(this)">
							<td>${configStatus.index + 1 }</td>
							<td>${config.label}</td>
							<td>${config.name}</td>
							<td><c:if test="${fn:length(config.value) < 12}">${config.value}</c:if></td>
							<td>${config.unit}</td>
							<td>
							    <c:if test="${config.name == 'property_min_month'}">
								    <a class="fa fa-check" onclick="editConfig('${config.id}',2);">编辑&nbsp;|</a>
								</c:if> 
								<c:if test="${config.name == 'property_feebill_paytime'}">
						            <a class="fa fa-check" onclick="editConfig('${config.id}',2);">编辑&nbsp;|</a>
								</c:if> 
								<c:if test="${config.name == 'property_feebill_memo'}">
								    <a class="fa fa-check" onclick="editConfig('${config.id}',1);">编辑&nbsp;|</a>
								</c:if> 
								<c:if test="${config.name == 'property_billtype_memo'}">
									<a class="fa fa-check" onclick="editConfig('${config.id}',1);">编辑&nbsp;|</a>
								</c:if> 
								<c:if test="${config.name == 'mall_integral_config'}">
									<a class="fa fa-check" onclick="editConfig('${config.id}',2);">编辑&nbsp;|</a>
								</c:if>
								<c:if test="${config.name == 'app_use_helper'}">
                                    <a class="fa fa-check" onclick="editConfig('${config.id}',1);">编辑&nbsp;|</a>
                                </c:if>
								<c:if test="${config.name == 'integral_max'}">
                                    <a class="fa fa-check" onclick="editConfig('${config.id}',2);">编辑&nbsp;|</a>
                                </c:if>
								<c:if test="${config.name == 'platform_phone'}">
                                    <a class="fa fa-check" onclick="editConfig('${config.id}',2);">编辑&nbsp;|</a>
                                </c:if>
                                <c:if test="${config.name == 'sign_rule'}">
                                    <a class="fa fa-check" onclick="editConfig('${config.id}',1);">编辑&nbsp;|</a>
                                </c:if>
                               <c:if test="${config.name == 'integral_exchange_rule'}">
                                    <a class="fa fa-check" onclick="editConfig('${config.id}',1);">编辑&nbsp;|</a>
                                </c:if>
								<c:if test="${config.name == 'seckill_rule'}">
                                    <a class="fa fa-check" onclick="editConfig('${config.id}',1);">编辑&nbsp;|</a>
                                </c:if>
								<c:if test="${config.name == 'register_protocol'}">
                                    <a class="fa fa-check" onclick="editConfig('${config.id}',1);">编辑&nbsp;|</a>
                                </c:if>
                                <c:if test="${config.name == 'app_about_us'}">
                                    <a class="fa fa-check" onclick="editConfig('${config.id}',1);">编辑&nbsp;|</a>
                                </c:if>
                                <c:if test="${config.name == 'integral_instruction'}">
                                    <a class="fa fa-check" onclick="editConfig('${config.id}',1);">编辑&nbsp;|</a>
                                </c:if>
                                <c:if test="${config.name == 'goods_carriage'}">
                                    <a class="fa fa-check " onclick="editConfig('${config.id}',2);">编辑&nbsp;|</a>
                                </c:if>
                                <c:if test="${config.name == 'normal_carriage_n'}">
                                    <a class="fa fa-check " onclick="editConfig('${config.id}',2);">编辑&nbsp;|</a>
                                </c:if>
                                 <c:if test="${config.name == 'normal_carriage_y'}">
                                    <a class="fa fa-check " onclick="editConfig('${config.id}',2);">编辑&nbsp;|</a>
                                </c:if>
                                 <c:if test="${config.name == 'normal_carriage_line'}">
                                    <a class="fa fa-check " onclick="editConfig('${config.id}',2);">编辑&nbsp;|</a>
                                </c:if>
                                <c:if test="${config.name == 'seckill_carriage'}">
                                    <a class="fa fa-check " onclick="editConfig('${config.id}',2);">编辑&nbsp;|</a>
                                </c:if>
                                 <c:if test="${config.name == 'cards_carriage'}">
                                    <a class="fa fa-check " onclick="editConfig('${config.id}',2);">编辑&nbsp;|</a>
                                </c:if>
								    <a class="fa fa-check" onclick="detailConfig('${config.id}');">详情</a>
							</td>
						</tr>
					</c:forEach>
				</tbody>
				<tfoot>
					<tr>
						<td colspan="7">
							<div>
								<input id="pages" type="hidden" value="${infoList.pages}">
								<div style="float: left;">
									<span class="total">合计 ${infoList.total} 条数据</span>
								</div>
								<div style="float: right; margin-right: 10px; margin-top: 29px">
									<div style="float: left;">
										<ul class="footer_ul">
											<c:if test="${infoList.hasPreviousPage }">
												<li onclick="gotoPage(${currentPage-1 });"><a
													style="color: #37CED4">&lt;&lt;</a></li>
											</c:if>
											<c:if test="${infoList.firstPage > 1}">
												<li onclick="gotoPage(1);"
													style="border: 1px solid #9A9A9A;"><a>1</a></li>
												<c:if test="${detailInfo.firstPage > 2}">
							                  		...
							                  	</c:if>
											</c:if>
											<c:forEach items="${infoList.navigatepageNums }" var="page">
												<li onclick="gotoPage(${page });"
													class="<c:if test="${currentPage == page }">active</c:if>"
													style="border: 1px solid #9A9A9A;"><a>${page}</a></li>
											</c:forEach>
											<c:if test="${infoList.lastPage < infoList.pages}">
												<c:if test="${infoList.firstPage < infoList.pages - 1}">
							                  		...
							                  	</c:if>
												<li onclick="gotoPage(${infoList.pages});"
													style="border: 1px solid #9A9A9A;"><a>${detailInfo.pages}</a>
												</li>
											</c:if>
											<c:if test="${infoList.hasNextPage }">
												<li><a onclick="gotoPage(${currentPage+1});"
													style="color: #37CED4">&gt;&gt;</a></li>
											</c:if>
										</ul>
									</div>
									<div style="float: left; height: 30px;">
										<span>跳转到</span> <input class="inputclass" id="pageNo"
											onkeydown="if(event.keyCode==13){event.keyCode=0;return false;}"
											type="text" value="${currentPage }"
											style="width: 30px; height: 31px"onkeyup = "checInputNum(this)"> <span>页</span> <span
											class="buttonclass" id="J_JumpTo"
											onclick="gotoConfigPage(null);"><a>GO</a></span>
									</div>
								</div>
							</div>
						</td>
					</tr>
				</tfoot>
			</table>

		</div>
		<%@include file="/views/common/footer.jsp"%>
	</section>
</section>
<script type="text/javascript">
		var ctx = '${ctx}';
		setCtx(ctx);
		
		//实现选中取消切换图片
		$("tbody td>img").toggle(function(){    
		    $(this).attr("src","${ctx }/images/tables/honggou.png"); 
		    //$(this).parents("tr").children().each(function(){
			   // $(this).css("background","#D3F0F1");
		   //});    
		},function(){    
		    $(this).attr("src", "${ctx }/images/tables/wugou.png"); 
		    //$(this).parents("tr").children().each(function(){
			    //$(this).css("background","");
		   //});
		    });
		    
		//实现全选切换所有选项图标
		$("#all").toggle(function(){    
		    $(this).attr("src","${ctx }/images/tables/honggou.png"); 
		    $("tbody td>img").attr("src","${ctx }/images/tables/honggou.png");  
		},function(){    
		    $(this).attr("src", "${ctx }/images/tables/wugou.png"); 
		    $("tbody td>img").attr("src","${ctx }/images/tables/wugou.png");  
		    });
	</script>
<!-- 解决ie 6 7 8 9不能显示placeholder的问题 -->
<script src="${ctx}/js/lib/jquery.JPlaceholder.js"></script>
